﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace MainWindowAndConsole
{
    static class Program
    {
        /// <summary>
        /// 应用程序的主入口点。
        /// </summary>
        [STAThread]
        static void Main(string[] args)
        {
            if (args.Length != 0)
            {
                if (args[0] == "Mode:Window")
                {
                    Application.EnableVisualStyles();
                    Application.SetCompatibleTextRenderingDefault(false);
                    Application.Run(new Window());
                }
                else if(args[0] == "Mode:Console")
                {
                    System.Diagnostics.Process pro = new System.Diagnostics.Process();
                    pro.StartInfo.FileName = "PNTShellCore.exe";
                    pro.StartInfo.Arguments = "";
                    pro.StartInfo.UseShellExecute = false;
                    pro.StartInfo.CreateNoWindow = false;
                    pro.Start();
                }
            }
            else
            {
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);
                Application.Run(new Window());
            }

        }
    }
}
